# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Jon Nordby <jononor@gmail.com>

pkgname=mypaint
pkgver=2.0.1
pkgrel=3
pkgdesc='Fast and easy painting application for digital painters, with brush dynamics'
arch=('loong64' 'x86_64')
url='http://mypaint.org/'
license=('GPL')
depends=('gtk3' 'libmypaint' 'mypaint-brushes' 'python-cairo' 'python-gobject' 'python-numpy')
makedepends=('python-setuptools' 'swig')
options=('!emptydirs')
source=("https://github.com/mypaint/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.xz"
         https://github.com/mypaint/mypaint/commit/032a155b.patch)
#validpgpkeys=('C02391F4BBA4F0E2B27C6BFF6E3037E12878B299') # Andrew Chadwick
sha256sums=('f3e437d7cdd5fd28ef6532e8ab6b4b05d842bcdd644f16a0162dad3d8e57bb16'
            'b893d4b94dea23f1c71e363893bba2439a824bec05575b1514d6821397fc3d53')

prepare() {
  cd $pkgname-$pkgver
  patch -p1 -i ../032a155b.patch # Fix install with Python 3.11
}

build() {
  cd $pkgname-$pkgver
  python setup.py build
}

package() {
  cd $pkgname-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}
